<html>
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
</head>
<body>
    <h1>用户注册界面</h1>
    {% if status %}
        <p>已经登录,用户名是{{ status }}</p>
        <p><a href="/login/logout">退出</a></p>
    {% else %}
        <form action="register_write_mysql" method="post">
            <p>用户名:<input type="text" name="username"></p>
            <p>密&nbsp;&nbsp;&nbsp;码:<input type="text" name="passwd"></p>
            <input type="submit" value="登录">
        </form>
    {% endif %}
    {% for msg in get_flashed_messages() %}
        {{ msg }}
    {% endfor %}
<a href="/">返回首页</a>
</body>
</html>